<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="display" uri="http://displaytag.sf.net" %>
<%
	String contextPath = request.getContextPath();
%>
<html>
<head>
<link href="style/store.css" rel="stylesheet" type="text/css">
<link href="style/displaytagex.css" rel="stylesheet" type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title></title>
	<script type="text/javascript">
		function selectItem(barcode){
			window.opener.document.getElementById("blah").value=barcode;
			window.opener.addProduct();
			window.close();
			
		}
	</script>
</head>
<body>
<br/>
	
	<table align="center">
		<tr>
			<td class="error" >
				<s:actionerror/>
				<s:actionmessage/>
			</td>
		</tr>
	</table>
<br/>
<s:form name="form1" method="post" action="searchProductAction">
	<table align="center">
		<tr>
			<td colspan="2" class="verdana" height="30" align="center" bgcolor="#336699"><font color="#ffffff" >Seach Products</td>
		</tr>
		<tr bgcolor="#e8ecf0" style="font-size: 11px; font-family: Arial, Helvetica, sans-serif" >
			<td>Product Name:<input type="text" name="query" id="query" size="20" >
				&nbsp;<input type="submit" value="Search" > 
		</tr>
	</table>
</s:form>
<br/>
	<center>
	<display:table name="productList" requestURI="setSearchProductAction.action" pagesize="10" id="row" class="dataTable" >
		<display:column property="prodId" title="Product ID" />
		<display:column property="barcode" title="Barcode" />
		<display:column property="name" title="Product Name" sortable="true" />
		<display:column property="price" title="Price" />
		<display:column>
			<s:a href="#" onclick="selectItem('%{#attr.row.barcode}');" >Select</s:a>
		</display:column>
	<display:setProperty name="paging.banner.placement" value="bottom" />
	</display:table>
	</center>
	
</body>
</html>







